package com.education.platform.dao;

import com.education.platform.common.dao.BaseDao;
import com.education.platform.dao.model.PayRecordModel;
import org.springframework.stereotype.Repository;
import com.education.platform.dao.entity.PayRecordDO;

import java.util.List;

/**
* describe: 支付记录
* @author : tomato
* @date: 2020-06-21 09:35:03.389
**/
@Repository
public interface PayRecordDao extends BaseDao<PayRecordDO> {

    /**
     * 修改支付记录
     * @param payRecordDO
     * @return
     */
    int updateRecordByOrderNo(PayRecordDO payRecordDO);

    /**
     * 查询支付记录
     * @param orderNo
     * @return
     */
    PayRecordDO getByOrderNo(String orderNo);

    /**
     * 支付记录
     * @param query
     * @return
     */
    List<PayRecordModel> getPayRecordList(PayRecordModel query);

    /**
     * 获取成功充值次数
     * @param userId
     * @return
     */
    int getSuccessCountByUserId(Integer userId);
}